<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><title>register</title></head>
<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
    function refresh(obj) {
        obj.src = "/blog/image?" + Math.random();
    }
    function changeCode() {
        $('#kaptchaImage').hide().attr('src', '/kaptcha/getKaptchaImage?' + Math.floor(Math.random() * 100)).fadeIn(10);
    }
    $(document).ready(function() {
        $('#kaptchaImage').click(function () {//生成验证码

            $('#kaptchaImage').attr('src', '/kaptcha/getKaptchaImage?' + Math.floor(Math.random() * 100));
        });
    });
</script>
<body>
<form action="/blog/reg" method="post">

    <table cellspacing="0" cellpadding="0">
        <tbody>
        <tr>
            <th nowrap="">用户名：</th>
            <td>
                <input type="text" name="name" id="name" value="" class="TEXT" style="width:200px;">
            </td>
        </tr>
        <tr>
            <th nowrap="">密码：</th>
            <td>
                <input type="password" name="password" id="password" value="" class="TEXT" style="width:200px;">
            </td>
        </tr>
        <tr>
            <th nowrap="">验证码：</th>
            <td>
                <input type="text" name="randomCode"/><img title="点击更换" onclick="javascript:refresh(this);"
                                                           src="/blog/image"><br/>
            </td>
        </tr>
        <tr>
            <th nowrap=""></th>
            <td>
                <input type="submit" value="注册新用户" class="TEXT" style="width:200px;">
            </td>
        </tr>
        </tbody>
    </table>
</form>

<img src="/kaptcha/getKaptchaImage" id="kaptchaImage"/><a href="javascript:changeCode();">看不清?换一张</a>
<label>验证码:
    <input name="kaptcha" type="text" id="kaptcha" maxlength="4" class="chknumber_input"/>


    <img src="/kaptcha/fishEyeGimpy" id="fishEyeGimpy"/>
</label>
</body>
</html>